package org.dromara.mall.domain.bo;

import org.dromara.mall.domain.TerMallProduct;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import org.dromara.common.translation.annotation.Translation;
import org.dromara.common.translation.constant.TransConstant;

/**
 * 商品业务对象 ter_mall_product
 *
 * @author xch
 * @date 2025-06-27
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = TerMallProduct.class, reverseConvertGenerate = false)
public class TerMallProductBo extends BaseEntity {

    /**
     *
     */
    @NotNull(message = "不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 分类ID
     */
    @NotNull(message = "分类ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long categoryId;

    /**
     * 商品名称
     */
    @NotBlank(message = "商品名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;

    /**
     * 价格
     */
    @NotNull(message = "价格不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long price;

    /**
     * 库存
     */
    private Integer stock;

    /**
     * 缩略图URL
     */
    private String thumbnail;

    /**
     * 详情图URL（JSON数组）
     */
    private String images;

    /**
     * 商品描述
     */
    private String description;

    /**
     * 销量
     */
    private Integer sales;

    /**
     * 状态(0=上架,1=下架)
     */
    private Integer status;

    /**
     * 是否热销
     */
    private Integer isHot;

    /**
     * 轮播图
     */
    private String carouselImage;

    private Integer version;
}
